package com.bestseller.util;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class GenericClass {

	public static Class getGenericClass(Class clazz) {
		ParameterizedType type = (ParameterizedType) clazz.getGenericSuperclass();
		Type[] actualTypeArguments = type.getActualTypeArguments();
		return (Class) actualTypeArguments[0];
	}

}
